(0) Obligation:

Clauses:

hidden_flatten([], L, L).
hidden_flatten(.(.(H, T), L), S, F) :- ','(!, ','(hidden_flatten(L, S, Lf), hidden_flatten(.(H, T), Lf, F))).
hidden_flatten(.(H, T), S, .(H, L)) :- hidden_flatten(T, S, L).

Query: hidden_flatten(g,a,a)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

pA([], T21, T21, T11, T12, T22) :- hidden_flattenB(.(T11, T12), T21, T22).
pA(.(.(T39, T40), T41), T43, X71, T11, T12, T44) :- hidden_flattenC(T41, T43, X70).
pA(.(.(T39, T40), T41), T43, X71, T11, T12, T48) :- ','(hidden_flattenC(T41, T43, T47), pA(.(T39, T40), T47, X71, T11, T12, T48)).
pA(.(T98, T99), T101, .(T98, X160), T11, T12, T102) :- hidden_flattenC(T99, T101, X160).
pA(.(T98, T99), T101, .(T98, T105), T11, T12, T106) :- ','(hidden_flattenC(T99, T101, T105), hidden_flattenB(.(T11, T12), .(T98, T105), T106)).
hidden_flattenC([], T53, T53).
hidden_flattenC(.(.(T70, T71), T72), T74, X120) :- hidden_flattenC(T72, T74, X119).
hidden_flattenC(.(.(T70, T71), T72), T74, X120) :- ','(hidden_flattenC(T72, T74, T77), hidden_flattenB(.(T70, T71), T77, X120)).
hidden_flattenC(.(T86, T87), T89, .(T86, X141)) :- hidden_flattenC(T87, T89, X141).
hidden_flattenB([], T5, T5).
hidden_flattenB(.(.(T11, T12), T13), T16, T17) :- pA(T13, T16, X22, T11, T12, T17).
hidden_flattenB(.(T113, []), T121, .(T113, T121)).
hidden_flattenB(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) :- pA(T144, T147, X214, T142, T143, T148).
hidden_flattenB(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) :- hidden_flattenB(T160, T163, T164).

Query: hidden_flattenB(g,a,a)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
hidden_flattenB_in: (b,f,f)
pA_in: (b,f,f,b,b,f)
hidden_flattenC_in: (b,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

hidden_flattenB_in_gaa([], T5, T5) → hidden_flattenB_out_gaa([], T5, T5)
hidden_flattenB_in_gaa(.(.(T11, T12), T13), T16, T17) → U12_gaa(T11, T12, T13, T16, T17, pA_in_gaagga(T13, T16, X22, T11, T12, T17))
pA_in_gaagga([], T21, T21, T11, T12, T22) → U1_gaagga(T21, T11, T12, T22, hidden_flattenB_in_gaa(.(T11, T12), T21, T22))
hidden_flattenB_in_gaa(.(T113, []), T121, .(T113, T121)) → hidden_flattenB_out_gaa(.(T113, []), T121, .(T113, T121))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → U13_gaa(T113, T142, T143, T144, T147, T148, pA_in_gaagga(T144, T147, X214, T142, T143, T148))
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_in_gaa(T41, T43, X70))
hidden_flattenC_in_gaa([], T53, T53) → hidden_flattenC_out_gaa([], T53, T53)
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, X119))
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
hidden_flattenC_in_gaa(.(T86, T87), T89, .(T86, X141)) → U11_gaa(T86, T87, T89, X141, hidden_flattenC_in_gaa(T87, T89, X141))
U11_gaa(T86, T87, T89, X141, hidden_flattenC_out_gaa(T87, T89, X141)) → hidden_flattenC_out_gaa(.(T86, T87), T89, .(T86, X141))
U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_in_gaa(.(T70, T71), T77, X120))
hidden_flattenB_in_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_in_gaa(T160, T163, T164))
U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_out_gaa(T160, T163, T164)) → hidden_flattenB_out_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164)))
U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_out_gaa(.(T70, T71), T77, X120)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, X119)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_out_gaa(T41, T43, X70)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44)
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_in_gaagga(.(T39, T40), T47, X71, T11, T12, T48))
pA_in_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_in_gaa(T99, T101, X160))
U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_out_gaa(T99, T101, X160)) → pA_out_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102)
pA_in_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_in_gaa(.(T11, T12), .(T98, T105), T106))
U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_out_gaa(.(T11, T12), .(T98, T105), T106)) → pA_out_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106)
U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_out_gaagga(.(T39, T40), T47, X71, T11, T12, T48)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48)
U13_gaa(T113, T142, T143, T144, T147, T148, pA_out_gaagga(T144, T147, X214, T142, T143, T148)) → hidden_flattenB_out_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148))
U1_gaagga(T21, T11, T12, T22, hidden_flattenB_out_gaa(.(T11, T12), T21, T22)) → pA_out_gaagga([], T21, T21, T11, T12, T22)
U12_gaa(T11, T12, T13, T16, T17, pA_out_gaagga(T13, T16, X22, T11, T12, T17)) → hidden_flattenB_out_gaa(.(.(T11, T12), T13), T16, T17)

The argument filtering Pi contains the following mapping:
hidden_flattenB_in_gaa(x1, x2, x3)  =  hidden_flattenB_in_gaa(x1)
[]  =  []
hidden_flattenB_out_gaa(x1, x2, x3)  =  hidden_flattenB_out_gaa
.(x1, x2)  =  .(x1, x2)
U12_gaa(x1, x2, x3, x4, x5, x6)  =  U12_gaa(x6)
pA_in_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_in_gaagga(x1, x4, x5)
U1_gaagga(x1, x2, x3, x4, x5)  =  U1_gaagga(x5)
U13_gaa(x1, x2, x3, x4, x5, x6, x7)  =  U13_gaa(x7)
U2_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U2_gaagga(x9)
hidden_flattenC_in_gaa(x1, x2, x3)  =  hidden_flattenC_in_gaa(x1)
hidden_flattenC_out_gaa(x1, x2, x3)  =  hidden_flattenC_out_gaa
U8_gaa(x1, x2, x3, x4, x5, x6)  =  U8_gaa(x6)
U9_gaa(x1, x2, x3, x4, x5, x6)  =  U9_gaa(x1, x2, x6)
U11_gaa(x1, x2, x3, x4, x5)  =  U11_gaa(x5)
U10_gaa(x1, x2, x3, x4, x5, x6)  =  U10_gaa(x6)
U14_gaa(x1, x2, x3, x4, x5, x6)  =  U14_gaa(x6)
pA_out_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_out_gaagga
U3_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_gaagga(x1, x2, x6, x7, x9)
U4_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_gaagga(x9)
U5_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U5_gaagga(x8)
U6_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaagga(x5, x6, x8)
U7_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaagga(x8)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

hidden_flattenB_in_gaa([], T5, T5) → hidden_flattenB_out_gaa([], T5, T5)
hidden_flattenB_in_gaa(.(.(T11, T12), T13), T16, T17) → U12_gaa(T11, T12, T13, T16, T17, pA_in_gaagga(T13, T16, X22, T11, T12, T17))
pA_in_gaagga([], T21, T21, T11, T12, T22) → U1_gaagga(T21, T11, T12, T22, hidden_flattenB_in_gaa(.(T11, T12), T21, T22))
hidden_flattenB_in_gaa(.(T113, []), T121, .(T113, T121)) → hidden_flattenB_out_gaa(.(T113, []), T121, .(T113, T121))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → U13_gaa(T113, T142, T143, T144, T147, T148, pA_in_gaagga(T144, T147, X214, T142, T143, T148))
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_in_gaa(T41, T43, X70))
hidden_flattenC_in_gaa([], T53, T53) → hidden_flattenC_out_gaa([], T53, T53)
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, X119))
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
hidden_flattenC_in_gaa(.(T86, T87), T89, .(T86, X141)) → U11_gaa(T86, T87, T89, X141, hidden_flattenC_in_gaa(T87, T89, X141))
U11_gaa(T86, T87, T89, X141, hidden_flattenC_out_gaa(T87, T89, X141)) → hidden_flattenC_out_gaa(.(T86, T87), T89, .(T86, X141))
U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_in_gaa(.(T70, T71), T77, X120))
hidden_flattenB_in_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_in_gaa(T160, T163, T164))
U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_out_gaa(T160, T163, T164)) → hidden_flattenB_out_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164)))
U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_out_gaa(.(T70, T71), T77, X120)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, X119)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_out_gaa(T41, T43, X70)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44)
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_in_gaagga(.(T39, T40), T47, X71, T11, T12, T48))
pA_in_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_in_gaa(T99, T101, X160))
U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_out_gaa(T99, T101, X160)) → pA_out_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102)
pA_in_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_in_gaa(.(T11, T12), .(T98, T105), T106))
U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_out_gaa(.(T11, T12), .(T98, T105), T106)) → pA_out_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106)
U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_out_gaagga(.(T39, T40), T47, X71, T11, T12, T48)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48)
U13_gaa(T113, T142, T143, T144, T147, T148, pA_out_gaagga(T144, T147, X214, T142, T143, T148)) → hidden_flattenB_out_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148))
U1_gaagga(T21, T11, T12, T22, hidden_flattenB_out_gaa(.(T11, T12), T21, T22)) → pA_out_gaagga([], T21, T21, T11, T12, T22)
U12_gaa(T11, T12, T13, T16, T17, pA_out_gaagga(T13, T16, X22, T11, T12, T17)) → hidden_flattenB_out_gaa(.(.(T11, T12), T13), T16, T17)

The argument filtering Pi contains the following mapping:
hidden_flattenB_in_gaa(x1, x2, x3)  =  hidden_flattenB_in_gaa(x1)
[]  =  []
hidden_flattenB_out_gaa(x1, x2, x3)  =  hidden_flattenB_out_gaa
.(x1, x2)  =  .(x1, x2)
U12_gaa(x1, x2, x3, x4, x5, x6)  =  U12_gaa(x6)
pA_in_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_in_gaagga(x1, x4, x5)
U1_gaagga(x1, x2, x3, x4, x5)  =  U1_gaagga(x5)
U13_gaa(x1, x2, x3, x4, x5, x6, x7)  =  U13_gaa(x7)
U2_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U2_gaagga(x9)
hidden_flattenC_in_gaa(x1, x2, x3)  =  hidden_flattenC_in_gaa(x1)
hidden_flattenC_out_gaa(x1, x2, x3)  =  hidden_flattenC_out_gaa
U8_gaa(x1, x2, x3, x4, x5, x6)  =  U8_gaa(x6)
U9_gaa(x1, x2, x3, x4, x5, x6)  =  U9_gaa(x1, x2, x6)
U11_gaa(x1, x2, x3, x4, x5)  =  U11_gaa(x5)
U10_gaa(x1, x2, x3, x4, x5, x6)  =  U10_gaa(x6)
U14_gaa(x1, x2, x3, x4, x5, x6)  =  U14_gaa(x6)
pA_out_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_out_gaagga
U3_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_gaagga(x1, x2, x6, x7, x9)
U4_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_gaagga(x9)
U5_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U5_gaagga(x8)
U6_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaagga(x5, x6, x8)
U7_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaagga(x8)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13), T16, T17) → U12_GAA(T11, T12, T13, T16, T17, pA_in_gaagga(T13, T16, X22, T11, T12, T17))
HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13), T16, T17) → PA_IN_GAAGGA(T13, T16, X22, T11, T12, T17)
PA_IN_GAAGGA([], T21, T21, T11, T12, T22) → U1_GAAGGA(T21, T11, T12, T22, hidden_flattenB_in_gaa(.(T11, T12), T21, T22))
PA_IN_GAAGGA([], T21, T21, T11, T12, T22) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12), T21, T22)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → U13_GAA(T113, T142, T143, T144, T147, T148, pA_in_gaagga(T144, T147, X214, T142, T143, T148))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → PA_IN_GAAGGA(T144, T147, X214, T142, T143, T148)
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → U2_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_in_gaa(T41, T43, X70))
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → HIDDEN_FLATTENC_IN_GAA(T41, T43, X70)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → U8_GAA(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, X119))
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → HIDDEN_FLATTENC_IN_GAA(T72, T74, X119)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
HIDDEN_FLATTENC_IN_GAA(.(T86, T87), T89, .(T86, X141)) → U11_GAA(T86, T87, T89, X141, hidden_flattenC_in_gaa(T87, T89, X141))
HIDDEN_FLATTENC_IN_GAA(.(T86, T87), T89, .(T86, X141)) → HIDDEN_FLATTENC_IN_GAA(T87, T89, X141)
U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → U10_GAA(T70, T71, T72, T74, X120, hidden_flattenB_in_gaa(.(T70, T71), T77, X120))
U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71), T77, X120)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → U14_GAA(T113, T159, T160, T163, T164, hidden_flattenB_in_gaa(T160, T163, T164))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → HIDDEN_FLATTENB_IN_GAA(T160, T163, T164)
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → U4_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, pA_in_gaagga(.(T39, T40), T47, X71, T11, T12, T48))
U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → PA_IN_GAAGGA(.(T39, T40), T47, X71, T11, T12, T48)
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → U5_GAAGGA(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_in_gaa(T99, T101, X160))
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → HIDDEN_FLATTENC_IN_GAA(T99, T101, X160)
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → U7_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_in_gaa(.(T11, T12), .(T98, T105), T106))
U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12), .(T98, T105), T106)

The TRS R consists of the following rules:

hidden_flattenB_in_gaa([], T5, T5) → hidden_flattenB_out_gaa([], T5, T5)
hidden_flattenB_in_gaa(.(.(T11, T12), T13), T16, T17) → U12_gaa(T11, T12, T13, T16, T17, pA_in_gaagga(T13, T16, X22, T11, T12, T17))
pA_in_gaagga([], T21, T21, T11, T12, T22) → U1_gaagga(T21, T11, T12, T22, hidden_flattenB_in_gaa(.(T11, T12), T21, T22))
hidden_flattenB_in_gaa(.(T113, []), T121, .(T113, T121)) → hidden_flattenB_out_gaa(.(T113, []), T121, .(T113, T121))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → U13_gaa(T113, T142, T143, T144, T147, T148, pA_in_gaagga(T144, T147, X214, T142, T143, T148))
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_in_gaa(T41, T43, X70))
hidden_flattenC_in_gaa([], T53, T53) → hidden_flattenC_out_gaa([], T53, T53)
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, X119))
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
hidden_flattenC_in_gaa(.(T86, T87), T89, .(T86, X141)) → U11_gaa(T86, T87, T89, X141, hidden_flattenC_in_gaa(T87, T89, X141))
U11_gaa(T86, T87, T89, X141, hidden_flattenC_out_gaa(T87, T89, X141)) → hidden_flattenC_out_gaa(.(T86, T87), T89, .(T86, X141))
U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_in_gaa(.(T70, T71), T77, X120))
hidden_flattenB_in_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_in_gaa(T160, T163, T164))
U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_out_gaa(T160, T163, T164)) → hidden_flattenB_out_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164)))
U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_out_gaa(.(T70, T71), T77, X120)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, X119)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_out_gaa(T41, T43, X70)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44)
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_in_gaagga(.(T39, T40), T47, X71, T11, T12, T48))
pA_in_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_in_gaa(T99, T101, X160))
U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_out_gaa(T99, T101, X160)) → pA_out_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102)
pA_in_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_in_gaa(.(T11, T12), .(T98, T105), T106))
U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_out_gaa(.(T11, T12), .(T98, T105), T106)) → pA_out_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106)
U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_out_gaagga(.(T39, T40), T47, X71, T11, T12, T48)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48)
U13_gaa(T113, T142, T143, T144, T147, T148, pA_out_gaagga(T144, T147, X214, T142, T143, T148)) → hidden_flattenB_out_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148))
U1_gaagga(T21, T11, T12, T22, hidden_flattenB_out_gaa(.(T11, T12), T21, T22)) → pA_out_gaagga([], T21, T21, T11, T12, T22)
U12_gaa(T11, T12, T13, T16, T17, pA_out_gaagga(T13, T16, X22, T11, T12, T17)) → hidden_flattenB_out_gaa(.(.(T11, T12), T13), T16, T17)

The argument filtering Pi contains the following mapping:
hidden_flattenB_in_gaa(x1, x2, x3)  =  hidden_flattenB_in_gaa(x1)
[]  =  []
hidden_flattenB_out_gaa(x1, x2, x3)  =  hidden_flattenB_out_gaa
.(x1, x2)  =  .(x1, x2)
U12_gaa(x1, x2, x3, x4, x5, x6)  =  U12_gaa(x6)
pA_in_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_in_gaagga(x1, x4, x5)
U1_gaagga(x1, x2, x3, x4, x5)  =  U1_gaagga(x5)
U13_gaa(x1, x2, x3, x4, x5, x6, x7)  =  U13_gaa(x7)
U2_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U2_gaagga(x9)
hidden_flattenC_in_gaa(x1, x2, x3)  =  hidden_flattenC_in_gaa(x1)
hidden_flattenC_out_gaa(x1, x2, x3)  =  hidden_flattenC_out_gaa
U8_gaa(x1, x2, x3, x4, x5, x6)  =  U8_gaa(x6)
U9_gaa(x1, x2, x3, x4, x5, x6)  =  U9_gaa(x1, x2, x6)
U11_gaa(x1, x2, x3, x4, x5)  =  U11_gaa(x5)
U10_gaa(x1, x2, x3, x4, x5, x6)  =  U10_gaa(x6)
U14_gaa(x1, x2, x3, x4, x5, x6)  =  U14_gaa(x6)
pA_out_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_out_gaagga
U3_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_gaagga(x1, x2, x6, x7, x9)
U4_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_gaagga(x9)
U5_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U5_gaagga(x8)
U6_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaagga(x5, x6, x8)
U7_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaagga(x8)
HIDDEN_FLATTENB_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTENB_IN_GAA(x1)
U12_GAA(x1, x2, x3, x4, x5, x6)  =  U12_GAA(x6)
PA_IN_GAAGGA(x1, x2, x3, x4, x5, x6)  =  PA_IN_GAAGGA(x1, x4, x5)
U1_GAAGGA(x1, x2, x3, x4, x5)  =  U1_GAAGGA(x5)
U13_GAA(x1, x2, x3, x4, x5, x6, x7)  =  U13_GAA(x7)
U2_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U2_GAAGGA(x9)
HIDDEN_FLATTENC_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTENC_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4, x5, x6)  =  U8_GAA(x6)
U9_GAA(x1, x2, x3, x4, x5, x6)  =  U9_GAA(x1, x2, x6)
U11_GAA(x1, x2, x3, x4, x5)  =  U11_GAA(x5)
U10_GAA(x1, x2, x3, x4, x5, x6)  =  U10_GAA(x6)
U14_GAA(x1, x2, x3, x4, x5, x6)  =  U14_GAA(x6)
U3_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_GAAGGA(x1, x2, x6, x7, x9)
U4_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_GAAGGA(x9)
U5_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U5_GAAGGA(x8)
U6_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAGGA(x5, x6, x8)
U7_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GAAGGA(x8)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13), T16, T17) → U12_GAA(T11, T12, T13, T16, T17, pA_in_gaagga(T13, T16, X22, T11, T12, T17))
HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13), T16, T17) → PA_IN_GAAGGA(T13, T16, X22, T11, T12, T17)
PA_IN_GAAGGA([], T21, T21, T11, T12, T22) → U1_GAAGGA(T21, T11, T12, T22, hidden_flattenB_in_gaa(.(T11, T12), T21, T22))
PA_IN_GAAGGA([], T21, T21, T11, T12, T22) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12), T21, T22)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → U13_GAA(T113, T142, T143, T144, T147, T148, pA_in_gaagga(T144, T147, X214, T142, T143, T148))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → PA_IN_GAAGGA(T144, T147, X214, T142, T143, T148)
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → U2_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_in_gaa(T41, T43, X70))
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → HIDDEN_FLATTENC_IN_GAA(T41, T43, X70)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → U8_GAA(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, X119))
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → HIDDEN_FLATTENC_IN_GAA(T72, T74, X119)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
HIDDEN_FLATTENC_IN_GAA(.(T86, T87), T89, .(T86, X141)) → U11_GAA(T86, T87, T89, X141, hidden_flattenC_in_gaa(T87, T89, X141))
HIDDEN_FLATTENC_IN_GAA(.(T86, T87), T89, .(T86, X141)) → HIDDEN_FLATTENC_IN_GAA(T87, T89, X141)
U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → U10_GAA(T70, T71, T72, T74, X120, hidden_flattenB_in_gaa(.(T70, T71), T77, X120))
U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71), T77, X120)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → U14_GAA(T113, T159, T160, T163, T164, hidden_flattenB_in_gaa(T160, T163, T164))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → HIDDEN_FLATTENB_IN_GAA(T160, T163, T164)
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → U4_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, pA_in_gaagga(.(T39, T40), T47, X71, T11, T12, T48))
U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → PA_IN_GAAGGA(.(T39, T40), T47, X71, T11, T12, T48)
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → U5_GAAGGA(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_in_gaa(T99, T101, X160))
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → HIDDEN_FLATTENC_IN_GAA(T99, T101, X160)
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → U7_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_in_gaa(.(T11, T12), .(T98, T105), T106))
U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12), .(T98, T105), T106)

The TRS R consists of the following rules:

hidden_flattenB_in_gaa([], T5, T5) → hidden_flattenB_out_gaa([], T5, T5)
hidden_flattenB_in_gaa(.(.(T11, T12), T13), T16, T17) → U12_gaa(T11, T12, T13, T16, T17, pA_in_gaagga(T13, T16, X22, T11, T12, T17))
pA_in_gaagga([], T21, T21, T11, T12, T22) → U1_gaagga(T21, T11, T12, T22, hidden_flattenB_in_gaa(.(T11, T12), T21, T22))
hidden_flattenB_in_gaa(.(T113, []), T121, .(T113, T121)) → hidden_flattenB_out_gaa(.(T113, []), T121, .(T113, T121))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → U13_gaa(T113, T142, T143, T144, T147, T148, pA_in_gaagga(T144, T147, X214, T142, T143, T148))
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_in_gaa(T41, T43, X70))
hidden_flattenC_in_gaa([], T53, T53) → hidden_flattenC_out_gaa([], T53, T53)
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, X119))
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
hidden_flattenC_in_gaa(.(T86, T87), T89, .(T86, X141)) → U11_gaa(T86, T87, T89, X141, hidden_flattenC_in_gaa(T87, T89, X141))
U11_gaa(T86, T87, T89, X141, hidden_flattenC_out_gaa(T87, T89, X141)) → hidden_flattenC_out_gaa(.(T86, T87), T89, .(T86, X141))
U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_in_gaa(.(T70, T71), T77, X120))
hidden_flattenB_in_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_in_gaa(T160, T163, T164))
U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_out_gaa(T160, T163, T164)) → hidden_flattenB_out_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164)))
U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_out_gaa(.(T70, T71), T77, X120)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, X119)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_out_gaa(T41, T43, X70)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44)
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_in_gaagga(.(T39, T40), T47, X71, T11, T12, T48))
pA_in_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_in_gaa(T99, T101, X160))
U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_out_gaa(T99, T101, X160)) → pA_out_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102)
pA_in_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_in_gaa(.(T11, T12), .(T98, T105), T106))
U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_out_gaa(.(T11, T12), .(T98, T105), T106)) → pA_out_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106)
U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_out_gaagga(.(T39, T40), T47, X71, T11, T12, T48)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48)
U13_gaa(T113, T142, T143, T144, T147, T148, pA_out_gaagga(T144, T147, X214, T142, T143, T148)) → hidden_flattenB_out_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148))
U1_gaagga(T21, T11, T12, T22, hidden_flattenB_out_gaa(.(T11, T12), T21, T22)) → pA_out_gaagga([], T21, T21, T11, T12, T22)
U12_gaa(T11, T12, T13, T16, T17, pA_out_gaagga(T13, T16, X22, T11, T12, T17)) → hidden_flattenB_out_gaa(.(.(T11, T12), T13), T16, T17)

The argument filtering Pi contains the following mapping:
hidden_flattenB_in_gaa(x1, x2, x3)  =  hidden_flattenB_in_gaa(x1)
[]  =  []
hidden_flattenB_out_gaa(x1, x2, x3)  =  hidden_flattenB_out_gaa
.(x1, x2)  =  .(x1, x2)
U12_gaa(x1, x2, x3, x4, x5, x6)  =  U12_gaa(x6)
pA_in_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_in_gaagga(x1, x4, x5)
U1_gaagga(x1, x2, x3, x4, x5)  =  U1_gaagga(x5)
U13_gaa(x1, x2, x3, x4, x5, x6, x7)  =  U13_gaa(x7)
U2_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U2_gaagga(x9)
hidden_flattenC_in_gaa(x1, x2, x3)  =  hidden_flattenC_in_gaa(x1)
hidden_flattenC_out_gaa(x1, x2, x3)  =  hidden_flattenC_out_gaa
U8_gaa(x1, x2, x3, x4, x5, x6)  =  U8_gaa(x6)
U9_gaa(x1, x2, x3, x4, x5, x6)  =  U9_gaa(x1, x2, x6)
U11_gaa(x1, x2, x3, x4, x5)  =  U11_gaa(x5)
U10_gaa(x1, x2, x3, x4, x5, x6)  =  U10_gaa(x6)
U14_gaa(x1, x2, x3, x4, x5, x6)  =  U14_gaa(x6)
pA_out_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_out_gaagga
U3_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_gaagga(x1, x2, x6, x7, x9)
U4_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_gaagga(x9)
U5_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U5_gaagga(x8)
U6_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaagga(x5, x6, x8)
U7_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaagga(x8)
HIDDEN_FLATTENB_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTENB_IN_GAA(x1)
U12_GAA(x1, x2, x3, x4, x5, x6)  =  U12_GAA(x6)
PA_IN_GAAGGA(x1, x2, x3, x4, x5, x6)  =  PA_IN_GAAGGA(x1, x4, x5)
U1_GAAGGA(x1, x2, x3, x4, x5)  =  U1_GAAGGA(x5)
U13_GAA(x1, x2, x3, x4, x5, x6, x7)  =  U13_GAA(x7)
U2_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U2_GAAGGA(x9)
HIDDEN_FLATTENC_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTENC_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4, x5, x6)  =  U8_GAA(x6)
U9_GAA(x1, x2, x3, x4, x5, x6)  =  U9_GAA(x1, x2, x6)
U11_GAA(x1, x2, x3, x4, x5)  =  U11_GAA(x5)
U10_GAA(x1, x2, x3, x4, x5, x6)  =  U10_GAA(x6)
U14_GAA(x1, x2, x3, x4, x5, x6)  =  U14_GAA(x6)
U3_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_GAAGGA(x1, x2, x6, x7, x9)
U4_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_GAAGGA(x9)
U5_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U5_GAAGGA(x8)
U6_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAGGA(x5, x6, x8)
U7_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_GAAGGA(x8)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 11 less nodes.

(8) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13), T16, T17) → PA_IN_GAAGGA(T13, T16, X22, T11, T12, T17)
PA_IN_GAAGGA([], T21, T21, T11, T12, T22) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12), T21, T22)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → PA_IN_GAAGGA(T144, T147, X214, T142, T143, T148)
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → HIDDEN_FLATTENC_IN_GAA(T41, T43, X70)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → HIDDEN_FLATTENC_IN_GAA(T72, T74, X119)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72), T74, X120) → U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
U9_GAA(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71), T77, X120)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → HIDDEN_FLATTENB_IN_GAA(T160, T163, T164)
HIDDEN_FLATTENC_IN_GAA(.(T86, T87), T89, .(T86, X141)) → HIDDEN_FLATTENC_IN_GAA(T87, T89, X141)
PA_IN_GAAGGA(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_GAAGGA(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → PA_IN_GAAGGA(.(T39, T40), T47, X71, T11, T12, T48)
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → HIDDEN_FLATTENC_IN_GAA(T99, T101, X160)
PA_IN_GAAGGA(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_GAAGGA(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12), .(T98, T105), T106)

The TRS R consists of the following rules:

hidden_flattenB_in_gaa([], T5, T5) → hidden_flattenB_out_gaa([], T5, T5)
hidden_flattenB_in_gaa(.(.(T11, T12), T13), T16, T17) → U12_gaa(T11, T12, T13, T16, T17, pA_in_gaagga(T13, T16, X22, T11, T12, T17))
pA_in_gaagga([], T21, T21, T11, T12, T22) → U1_gaagga(T21, T11, T12, T22, hidden_flattenB_in_gaa(.(T11, T12), T21, T22))
hidden_flattenB_in_gaa(.(T113, []), T121, .(T113, T121)) → hidden_flattenB_out_gaa(.(T113, []), T121, .(T113, T121))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148)) → U13_gaa(T113, T142, T143, T144, T147, T148, pA_in_gaagga(T144, T147, X214, T142, T143, T148))
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44) → U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_in_gaa(T41, T43, X70))
hidden_flattenC_in_gaa([], T53, T53) → hidden_flattenC_out_gaa([], T53, T53)
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, X119))
hidden_flattenC_in_gaa(.(.(T70, T71), T72), T74, X120) → U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_in_gaa(T72, T74, T77))
hidden_flattenC_in_gaa(.(T86, T87), T89, .(T86, X141)) → U11_gaa(T86, T87, T89, X141, hidden_flattenC_in_gaa(T87, T89, X141))
U11_gaa(T86, T87, T89, X141, hidden_flattenC_out_gaa(T87, T89, X141)) → hidden_flattenC_out_gaa(.(T86, T87), T89, .(T86, X141))
U9_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, T77)) → U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_in_gaa(.(T70, T71), T77, X120))
hidden_flattenB_in_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164))) → U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_in_gaa(T160, T163, T164))
U14_gaa(T113, T159, T160, T163, T164, hidden_flattenB_out_gaa(T160, T163, T164)) → hidden_flattenB_out_gaa(.(T113, .(T159, T160)), T163, .(T113, .(T159, T164)))
U10_gaa(T70, T71, T72, T74, X120, hidden_flattenB_out_gaa(.(T70, T71), T77, X120)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U8_gaa(T70, T71, T72, T74, X120, hidden_flattenC_out_gaa(T72, T74, X119)) → hidden_flattenC_out_gaa(.(.(T70, T71), T72), T74, X120)
U2_gaagga(T39, T40, T41, T43, X71, T11, T12, T44, hidden_flattenC_out_gaa(T41, T43, X70)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T44)
pA_in_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48) → U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_in_gaa(T41, T43, T47))
U3_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, hidden_flattenC_out_gaa(T41, T43, T47)) → U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_in_gaagga(.(T39, T40), T47, X71, T11, T12, T48))
pA_in_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102) → U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_in_gaa(T99, T101, X160))
U5_gaagga(T98, T99, T101, X160, T11, T12, T102, hidden_flattenC_out_gaa(T99, T101, X160)) → pA_out_gaagga(.(T98, T99), T101, .(T98, X160), T11, T12, T102)
pA_in_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106) → U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_in_gaa(T99, T101, T105))
U6_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenC_out_gaa(T99, T101, T105)) → U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_in_gaa(.(T11, T12), .(T98, T105), T106))
U7_gaagga(T98, T99, T101, T105, T11, T12, T106, hidden_flattenB_out_gaa(.(T11, T12), .(T98, T105), T106)) → pA_out_gaagga(.(T98, T99), T101, .(T98, T105), T11, T12, T106)
U4_gaagga(T39, T40, T41, T43, X71, T11, T12, T48, pA_out_gaagga(.(T39, T40), T47, X71, T11, T12, T48)) → pA_out_gaagga(.(.(T39, T40), T41), T43, X71, T11, T12, T48)
U13_gaa(T113, T142, T143, T144, T147, T148, pA_out_gaagga(T144, T147, X214, T142, T143, T148)) → hidden_flattenB_out_gaa(.(T113, .(.(T142, T143), T144)), T147, .(T113, T148))
U1_gaagga(T21, T11, T12, T22, hidden_flattenB_out_gaa(.(T11, T12), T21, T22)) → pA_out_gaagga([], T21, T21, T11, T12, T22)
U12_gaa(T11, T12, T13, T16, T17, pA_out_gaagga(T13, T16, X22, T11, T12, T17)) → hidden_flattenB_out_gaa(.(.(T11, T12), T13), T16, T17)

The argument filtering Pi contains the following mapping:
hidden_flattenB_in_gaa(x1, x2, x3)  =  hidden_flattenB_in_gaa(x1)
[]  =  []
hidden_flattenB_out_gaa(x1, x2, x3)  =  hidden_flattenB_out_gaa
.(x1, x2)  =  .(x1, x2)
U12_gaa(x1, x2, x3, x4, x5, x6)  =  U12_gaa(x6)
pA_in_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_in_gaagga(x1, x4, x5)
U1_gaagga(x1, x2, x3, x4, x5)  =  U1_gaagga(x5)
U13_gaa(x1, x2, x3, x4, x5, x6, x7)  =  U13_gaa(x7)
U2_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U2_gaagga(x9)
hidden_flattenC_in_gaa(x1, x2, x3)  =  hidden_flattenC_in_gaa(x1)
hidden_flattenC_out_gaa(x1, x2, x3)  =  hidden_flattenC_out_gaa
U8_gaa(x1, x2, x3, x4, x5, x6)  =  U8_gaa(x6)
U9_gaa(x1, x2, x3, x4, x5, x6)  =  U9_gaa(x1, x2, x6)
U11_gaa(x1, x2, x3, x4, x5)  =  U11_gaa(x5)
U10_gaa(x1, x2, x3, x4, x5, x6)  =  U10_gaa(x6)
U14_gaa(x1, x2, x3, x4, x5, x6)  =  U14_gaa(x6)
pA_out_gaagga(x1, x2, x3, x4, x5, x6)  =  pA_out_gaagga
U3_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_gaagga(x1, x2, x6, x7, x9)
U4_gaagga(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_gaagga(x9)
U5_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U5_gaagga(x8)
U6_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_gaagga(x5, x6, x8)
U7_gaagga(x1, x2, x3, x4, x5, x6, x7, x8)  =  U7_gaagga(x8)
HIDDEN_FLATTENB_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTENB_IN_GAA(x1)
PA_IN_GAAGGA(x1, x2, x3, x4, x5, x6)  =  PA_IN_GAAGGA(x1, x4, x5)
HIDDEN_FLATTENC_IN_GAA(x1, x2, x3)  =  HIDDEN_FLATTENC_IN_GAA(x1)
U9_GAA(x1, x2, x3, x4, x5, x6)  =  U9_GAA(x1, x2, x6)
U3_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_GAAGGA(x1, x2, x6, x7, x9)
U6_GAAGGA(x1, x2, x3, x4, x5, x6, x7, x8)  =  U6_GAAGGA(x5, x6, x8)

We have to consider all (P,R,Pi)-chains

(9) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13)) → PA_IN_GAAGGA(T13, T11, T12)
PA_IN_GAAGGA([], T11, T12) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144))) → PA_IN_GAAGGA(T144, T142, T143)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T41)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → HIDDEN_FLATTENC_IN_GAA(T72)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → U9_GAA(T70, T71, hidden_flattenC_in_gaa(T72))
U9_GAA(T70, T71, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160))) → HIDDEN_FLATTENB_IN_GAA(T160)
HIDDEN_FLATTENC_IN_GAA(.(T86, T87)) → HIDDEN_FLATTENC_IN_GAA(T87)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_out_gaa) → PA_IN_GAAGGA(.(T39, T40), T11, T12)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T99)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → U6_GAAGGA(T11, T12, hidden_flattenC_in_gaa(T99))
U6_GAAGGA(T11, T12, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12))

The TRS R consists of the following rules:

hidden_flattenB_in_gaa([]) → hidden_flattenB_out_gaa
hidden_flattenB_in_gaa(.(.(T11, T12), T13)) → U12_gaa(pA_in_gaagga(T13, T11, T12))
pA_in_gaagga([], T11, T12) → U1_gaagga(hidden_flattenB_in_gaa(.(T11, T12)))
hidden_flattenB_in_gaa(.(T113, [])) → hidden_flattenB_out_gaa
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144))) → U13_gaa(pA_in_gaagga(T144, T142, T143))
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U2_gaagga(hidden_flattenC_in_gaa(T41))
hidden_flattenC_in_gaa([]) → hidden_flattenC_out_gaa
hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U8_gaa(hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U9_gaa(T70, T71, hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(T86, T87)) → U11_gaa(hidden_flattenC_in_gaa(T87))
U11_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa
U9_gaa(T70, T71, hidden_flattenC_out_gaa) → U10_gaa(hidden_flattenB_in_gaa(.(T70, T71)))
hidden_flattenB_in_gaa(.(T113, .(T159, T160))) → U14_gaa(hidden_flattenB_in_gaa(T160))
U14_gaa(hidden_flattenB_out_gaa) → hidden_flattenB_out_gaa
U10_gaa(hidden_flattenB_out_gaa) → hidden_flattenC_out_gaa
U8_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa
U2_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U3_gaagga(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
U3_gaagga(T39, T40, T11, T12, hidden_flattenC_out_gaa) → U4_gaagga(pA_in_gaagga(.(T39, T40), T11, T12))
pA_in_gaagga(.(T98, T99), T11, T12) → U5_gaagga(hidden_flattenC_in_gaa(T99))
U5_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
pA_in_gaagga(.(T98, T99), T11, T12) → U6_gaagga(T11, T12, hidden_flattenC_in_gaa(T99))
U6_gaagga(T11, T12, hidden_flattenC_out_gaa) → U7_gaagga(hidden_flattenB_in_gaa(.(T11, T12)))
U7_gaagga(hidden_flattenB_out_gaa) → pA_out_gaagga
U4_gaagga(pA_out_gaagga) → pA_out_gaagga
U13_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U1_gaagga(hidden_flattenB_out_gaa) → pA_out_gaagga
U12_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa

The set Q consists of the following terms:

hidden_flattenB_in_gaa(x0)
pA_in_gaagga(x0, x1, x2)
hidden_flattenC_in_gaa(x0)
U11_gaa(x0)
U9_gaa(x0, x1, x2)
U14_gaa(x0)
U10_gaa(x0)
U8_gaa(x0)
U2_gaagga(x0)
U3_gaagga(x0, x1, x2, x3, x4)
U5_gaagga(x0)
U6_gaagga(x0, x1, x2)
U7_gaagga(x0)
U4_gaagga(x0)
U13_gaa(x0)
U1_gaagga(x0)
U12_gaa(x0)

We have to consider all (P,Q,R)-chains.

(11) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

PA_IN_GAAGGA([], T11, T12) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12))
The following rules are removed from R:

hidden_flattenB_in_gaa([]) → hidden_flattenB_out_gaa
pA_in_gaagga([], T11, T12) → U1_gaagga(hidden_flattenB_in_gaa(.(T11, T12)))
hidden_flattenB_in_gaa(.(T113, [])) → hidden_flattenB_out_gaa
hidden_flattenC_in_gaa([]) → hidden_flattenC_out_gaa
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 2·x1 + 2·x2   
POL(HIDDEN_FLATTENB_IN_GAA(x1)) = x1   
POL(HIDDEN_FLATTENC_IN_GAA(x1)) = 2·x1   
POL(PA_IN_GAAGGA(x1, x2, x3)) = x1 + 2·x2 + 2·x3   
POL(U10_gaa(x1)) = x1   
POL(U11_gaa(x1)) = x1   
POL(U12_gaa(x1)) = x1   
POL(U13_gaa(x1)) = x1   
POL(U14_gaa(x1)) = x1   
POL(U1_gaagga(x1)) = x1   
POL(U2_gaagga(x1)) = x1   
POL(U3_GAAGGA(x1, x2, x3, x4, x5)) = 2·x1 + 2·x2 + 2·x3 + 2·x4 + x5   
POL(U3_gaagga(x1, x2, x3, x4, x5)) = 2·x1 + 2·x2 + 2·x3 + 2·x4 + x5   
POL(U4_gaagga(x1)) = x1   
POL(U5_gaagga(x1)) = x1   
POL(U6_GAAGGA(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(U6_gaagga(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(U7_gaagga(x1)) = x1   
POL(U8_gaa(x1)) = x1   
POL(U9_GAA(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(U9_gaa(x1, x2, x3)) = 2·x1 + 2·x2 + 2·x3   
POL([]) = 0   
POL(hidden_flattenB_in_gaa(x1)) = x1   
POL(hidden_flattenB_out_gaa) = 0   
POL(hidden_flattenC_in_gaa(x1)) = 2·x1   
POL(hidden_flattenC_out_gaa) = 0   
POL(pA_in_gaagga(x1, x2, x3)) = x1 + 2·x2 + 2·x3   
POL(pA_out_gaagga) = 0   

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13)) → PA_IN_GAAGGA(T13, T11, T12)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144))) → PA_IN_GAAGGA(T144, T142, T143)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T41)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → HIDDEN_FLATTENC_IN_GAA(T72)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → U9_GAA(T70, T71, hidden_flattenC_in_gaa(T72))
U9_GAA(T70, T71, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160))) → HIDDEN_FLATTENB_IN_GAA(T160)
HIDDEN_FLATTENC_IN_GAA(.(T86, T87)) → HIDDEN_FLATTENC_IN_GAA(T87)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_out_gaa) → PA_IN_GAAGGA(.(T39, T40), T11, T12)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T99)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → U6_GAAGGA(T11, T12, hidden_flattenC_in_gaa(T99))
U6_GAAGGA(T11, T12, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12))

The TRS R consists of the following rules:

hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U8_gaa(hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U9_gaa(T70, T71, hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(T86, T87)) → U11_gaa(hidden_flattenC_in_gaa(T87))
U11_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa
U9_gaa(T70, T71, hidden_flattenC_out_gaa) → U10_gaa(hidden_flattenB_in_gaa(.(T70, T71)))
hidden_flattenB_in_gaa(.(.(T11, T12), T13)) → U12_gaa(pA_in_gaagga(T13, T11, T12))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144))) → U13_gaa(pA_in_gaagga(T144, T142, T143))
hidden_flattenB_in_gaa(.(T113, .(T159, T160))) → U14_gaa(hidden_flattenB_in_gaa(T160))
U10_gaa(hidden_flattenB_out_gaa) → hidden_flattenC_out_gaa
U14_gaa(hidden_flattenB_out_gaa) → hidden_flattenB_out_gaa
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U2_gaagga(hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U3_gaagga(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(T98, T99), T11, T12) → U5_gaagga(hidden_flattenC_in_gaa(T99))
pA_in_gaagga(.(T98, T99), T11, T12) → U6_gaagga(T11, T12, hidden_flattenC_in_gaa(T99))
U13_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U6_gaagga(T11, T12, hidden_flattenC_out_gaa) → U7_gaagga(hidden_flattenB_in_gaa(.(T11, T12)))
U7_gaagga(hidden_flattenB_out_gaa) → pA_out_gaagga
U5_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
U3_gaagga(T39, T40, T11, T12, hidden_flattenC_out_gaa) → U4_gaagga(pA_in_gaagga(.(T39, T40), T11, T12))
U4_gaagga(pA_out_gaagga) → pA_out_gaagga
U2_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
U1_gaagga(hidden_flattenB_out_gaa) → pA_out_gaagga
U12_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U8_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa

The set Q consists of the following terms:

hidden_flattenB_in_gaa(x0)
pA_in_gaagga(x0, x1, x2)
hidden_flattenC_in_gaa(x0)
U11_gaa(x0)
U9_gaa(x0, x1, x2)
U14_gaa(x0)
U10_gaa(x0)
U8_gaa(x0)
U2_gaagga(x0)
U3_gaagga(x0, x1, x2, x3, x4)
U5_gaagga(x0)
U6_gaagga(x0, x1, x2)
U7_gaagga(x0)
U4_gaagga(x0)
U13_gaa(x0)
U1_gaagga(x0)
U12_gaa(x0)

We have to consider all (P,Q,R)-chains.

(13) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13)) → PA_IN_GAAGGA(T13, T11, T12)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144))) → PA_IN_GAAGGA(T144, T142, T143)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T41)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → HIDDEN_FLATTENC_IN_GAA(T72)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → U9_GAA(T70, T71, hidden_flattenC_in_gaa(T72))
U9_GAA(T70, T71, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160))) → HIDDEN_FLATTENB_IN_GAA(T160)
HIDDEN_FLATTENC_IN_GAA(.(T86, T87)) → HIDDEN_FLATTENC_IN_GAA(T87)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_out_gaa) → PA_IN_GAAGGA(.(T39, T40), T11, T12)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T99)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → U6_GAAGGA(T11, T12, hidden_flattenC_in_gaa(T99))
U6_GAAGGA(T11, T12, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12))

The TRS R consists of the following rules:

hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U8_gaa(hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U9_gaa(T70, T71, hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(T86, T87)) → U11_gaa(hidden_flattenC_in_gaa(T87))
U11_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa
U9_gaa(T70, T71, hidden_flattenC_out_gaa) → U10_gaa(hidden_flattenB_in_gaa(.(T70, T71)))
hidden_flattenB_in_gaa(.(.(T11, T12), T13)) → U12_gaa(pA_in_gaagga(T13, T11, T12))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144))) → U13_gaa(pA_in_gaagga(T144, T142, T143))
hidden_flattenB_in_gaa(.(T113, .(T159, T160))) → U14_gaa(hidden_flattenB_in_gaa(T160))
U10_gaa(hidden_flattenB_out_gaa) → hidden_flattenC_out_gaa
U14_gaa(hidden_flattenB_out_gaa) → hidden_flattenB_out_gaa
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U2_gaagga(hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U3_gaagga(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(T98, T99), T11, T12) → U5_gaagga(hidden_flattenC_in_gaa(T99))
pA_in_gaagga(.(T98, T99), T11, T12) → U6_gaagga(T11, T12, hidden_flattenC_in_gaa(T99))
U13_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U6_gaagga(T11, T12, hidden_flattenC_out_gaa) → U7_gaagga(hidden_flattenB_in_gaa(.(T11, T12)))
U7_gaagga(hidden_flattenB_out_gaa) → pA_out_gaagga
U5_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
U3_gaagga(T39, T40, T11, T12, hidden_flattenC_out_gaa) → U4_gaagga(pA_in_gaagga(.(T39, T40), T11, T12))
U4_gaagga(pA_out_gaagga) → pA_out_gaagga
U2_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
U12_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U8_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa

The set Q consists of the following terms:

hidden_flattenB_in_gaa(x0)
pA_in_gaagga(x0, x1, x2)
hidden_flattenC_in_gaa(x0)
U11_gaa(x0)
U9_gaa(x0, x1, x2)
U14_gaa(x0)
U10_gaa(x0)
U8_gaa(x0)
U2_gaagga(x0)
U3_gaagga(x0, x1, x2, x3, x4)
U5_gaagga(x0)
U6_gaagga(x0, x1, x2)
U7_gaagga(x0)
U4_gaagga(x0)
U13_gaa(x0)
U1_gaagga(x0)
U12_gaa(x0)

We have to consider all (P,Q,R)-chains.

(15) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

U1_gaagga(x0)

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13)) → PA_IN_GAAGGA(T13, T11, T12)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144))) → PA_IN_GAAGGA(T144, T142, T143)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T41)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → HIDDEN_FLATTENC_IN_GAA(T72)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → U9_GAA(T70, T71, hidden_flattenC_in_gaa(T72))
U9_GAA(T70, T71, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160))) → HIDDEN_FLATTENB_IN_GAA(T160)
HIDDEN_FLATTENC_IN_GAA(.(T86, T87)) → HIDDEN_FLATTENC_IN_GAA(T87)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_out_gaa) → PA_IN_GAAGGA(.(T39, T40), T11, T12)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T99)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → U6_GAAGGA(T11, T12, hidden_flattenC_in_gaa(T99))
U6_GAAGGA(T11, T12, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12))

The TRS R consists of the following rules:

hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U8_gaa(hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U9_gaa(T70, T71, hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(T86, T87)) → U11_gaa(hidden_flattenC_in_gaa(T87))
U11_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa
U9_gaa(T70, T71, hidden_flattenC_out_gaa) → U10_gaa(hidden_flattenB_in_gaa(.(T70, T71)))
hidden_flattenB_in_gaa(.(.(T11, T12), T13)) → U12_gaa(pA_in_gaagga(T13, T11, T12))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144))) → U13_gaa(pA_in_gaagga(T144, T142, T143))
hidden_flattenB_in_gaa(.(T113, .(T159, T160))) → U14_gaa(hidden_flattenB_in_gaa(T160))
U10_gaa(hidden_flattenB_out_gaa) → hidden_flattenC_out_gaa
U14_gaa(hidden_flattenB_out_gaa) → hidden_flattenB_out_gaa
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U2_gaagga(hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U3_gaagga(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(T98, T99), T11, T12) → U5_gaagga(hidden_flattenC_in_gaa(T99))
pA_in_gaagga(.(T98, T99), T11, T12) → U6_gaagga(T11, T12, hidden_flattenC_in_gaa(T99))
U13_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U6_gaagga(T11, T12, hidden_flattenC_out_gaa) → U7_gaagga(hidden_flattenB_in_gaa(.(T11, T12)))
U7_gaagga(hidden_flattenB_out_gaa) → pA_out_gaagga
U5_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
U3_gaagga(T39, T40, T11, T12, hidden_flattenC_out_gaa) → U4_gaagga(pA_in_gaagga(.(T39, T40), T11, T12))
U4_gaagga(pA_out_gaagga) → pA_out_gaagga
U2_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
U12_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U8_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa

The set Q consists of the following terms:

hidden_flattenB_in_gaa(x0)
pA_in_gaagga(x0, x1, x2)
hidden_flattenC_in_gaa(x0)
U11_gaa(x0)
U9_gaa(x0, x1, x2)
U14_gaa(x0)
U10_gaa(x0)
U8_gaa(x0)
U2_gaagga(x0)
U3_gaagga(x0, x1, x2, x3, x4)
U5_gaagga(x0)
U6_gaagga(x0, x1, x2)
U7_gaagga(x0)
U4_gaagga(x0)
U13_gaa(x0)
U12_gaa(x0)

We have to consider all (P,Q,R)-chains.

(17) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

HIDDEN_FLATTENB_IN_GAA(.(.(T11, T12), T13)) → PA_IN_GAAGGA(T13, T11, T12)
HIDDEN_FLATTENB_IN_GAA(.(T113, .(.(T142, T143), T144))) → PA_IN_GAAGGA(T144, T142, T143)
PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T41)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → HIDDEN_FLATTENC_IN_GAA(T72)
HIDDEN_FLATTENC_IN_GAA(.(.(T70, T71), T72)) → U9_GAA(T70, T71, hidden_flattenC_in_gaa(T72))
U9_GAA(T70, T71, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T70, T71))
HIDDEN_FLATTENB_IN_GAA(.(T113, .(T159, T160))) → HIDDEN_FLATTENB_IN_GAA(T160)
HIDDEN_FLATTENC_IN_GAA(.(T86, T87)) → HIDDEN_FLATTENC_IN_GAA(T87)
U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_out_gaa) → PA_IN_GAAGGA(.(T39, T40), T11, T12)
PA_IN_GAAGGA(.(T98, T99), T11, T12) → U6_GAAGGA(T11, T12, hidden_flattenC_in_gaa(T99))
U6_GAAGGA(T11, T12, hidden_flattenC_out_gaa) → HIDDEN_FLATTENB_IN_GAA(.(T11, T12))

Strictly oriented rules of the TRS R:

hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U8_gaa(hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(.(T70, T71), T72)) → U9_gaa(T70, T71, hidden_flattenC_in_gaa(T72))
hidden_flattenC_in_gaa(.(T86, T87)) → U11_gaa(hidden_flattenC_in_gaa(T87))
U9_gaa(T70, T71, hidden_flattenC_out_gaa) → U10_gaa(hidden_flattenB_in_gaa(.(T70, T71)))
hidden_flattenB_in_gaa(.(T113, .(.(T142, T143), T144))) → U13_gaa(pA_in_gaagga(T144, T142, T143))
hidden_flattenB_in_gaa(.(T113, .(T159, T160))) → U14_gaa(hidden_flattenB_in_gaa(T160))
U14_gaa(hidden_flattenB_out_gaa) → hidden_flattenB_out_gaa
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U2_gaagga(hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(.(T39, T40), T41), T11, T12) → U3_gaagga(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
pA_in_gaagga(.(T98, T99), T11, T12) → U5_gaagga(hidden_flattenC_in_gaa(T99))
pA_in_gaagga(.(T98, T99), T11, T12) → U6_gaagga(T11, T12, hidden_flattenC_in_gaa(T99))
U6_gaagga(T11, T12, hidden_flattenC_out_gaa) → U7_gaagga(hidden_flattenB_in_gaa(.(T11, T12)))
U3_gaagga(T39, T40, T11, T12, hidden_flattenC_out_gaa) → U4_gaagga(pA_in_gaagga(.(T39, T40), T11, T12))
U2_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x1 + x2   
POL(HIDDEN_FLATTENB_IN_GAA(x1)) = x1   
POL(HIDDEN_FLATTENC_IN_GAA(x1)) = 2 + x1   
POL(PA_IN_GAAGGA(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(U10_gaa(x1)) = x1   
POL(U11_gaa(x1)) = x1   
POL(U12_gaa(x1)) = x1   
POL(U13_gaa(x1)) = x1   
POL(U14_gaa(x1)) = 1 + x1   
POL(U2_gaagga(x1)) = 1 + x1   
POL(U3_GAAGGA(x1, x2, x3, x4, x5)) = 2 + x1 + x2 + x3 + x4 + x5   
POL(U3_gaagga(x1, x2, x3, x4, x5)) = 2 + x1 + x2 + x3 + x4 + x5   
POL(U4_gaagga(x1)) = x1   
POL(U5_gaagga(x1)) = x1   
POL(U6_GAAGGA(x1, x2, x3)) = x1 + x2 + x3   
POL(U6_gaagga(x1, x2, x3)) = x1 + x2 + x3   
POL(U7_gaagga(x1)) = x1   
POL(U8_gaa(x1)) = x1   
POL(U9_GAA(x1, x2, x3)) = x1 + x2 + x3   
POL(U9_gaa(x1, x2, x3)) = x1 + x2 + x3   
POL(hidden_flattenB_in_gaa(x1)) = x1   
POL(hidden_flattenB_out_gaa) = 2   
POL(hidden_flattenC_in_gaa(x1)) = 1 + x1   
POL(hidden_flattenC_out_gaa) = 2   
POL(pA_in_gaagga(x1, x2, x3)) = 2 + x1 + x2 + x3   
POL(pA_out_gaagga) = 2   

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_GAAGGA(.(.(T39, T40), T41), T11, T12) → U3_GAAGGA(T39, T40, T11, T12, hidden_flattenC_in_gaa(T41))
PA_IN_GAAGGA(.(T98, T99), T11, T12) → HIDDEN_FLATTENC_IN_GAA(T99)

The TRS R consists of the following rules:

U11_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa
hidden_flattenB_in_gaa(.(.(T11, T12), T13)) → U12_gaa(pA_in_gaagga(T13, T11, T12))
U10_gaa(hidden_flattenB_out_gaa) → hidden_flattenC_out_gaa
U13_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U7_gaagga(hidden_flattenB_out_gaa) → pA_out_gaagga
U5_gaagga(hidden_flattenC_out_gaa) → pA_out_gaagga
U4_gaagga(pA_out_gaagga) → pA_out_gaagga
U12_gaa(pA_out_gaagga) → hidden_flattenB_out_gaa
U8_gaa(hidden_flattenC_out_gaa) → hidden_flattenC_out_gaa

The set Q consists of the following terms:

hidden_flattenB_in_gaa(x0)
pA_in_gaagga(x0, x1, x2)
hidden_flattenC_in_gaa(x0)
U11_gaa(x0)
U9_gaa(x0, x1, x2)
U14_gaa(x0)
U10_gaa(x0)
U8_gaa(x0)
U2_gaagga(x0)
U3_gaagga(x0, x1, x2, x3, x4)
U5_gaagga(x0)
U6_gaagga(x0, x1, x2)
U7_gaagga(x0)
U4_gaagga(x0)
U13_gaa(x0)
U12_gaa(x0)

We have to consider all (P,Q,R)-chains.

(19) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 2 less nodes.

(20) TRUE